package iface


const MSG_HEAD_LEN = 4
const MSG_HEAD_ID = 4
/*
InternalMsg用于服务器内部模块通信的一种消息
例如
1 模块和模块之间通信
2 层与层之间通信
*/
const (
	//0-1000 msgID 定义 网络相关的内部通信id
	//notfiy都是底层通信模块主动向上层传递消息
	NOTIFY_TCP_ESTABLISH = 1
	NOTIFY_TCP_READ      = 2
	NOTIFY_TCP_WRITE     = 3
	NOTIFY_TCP_CLOSE     = 4
	//command上层向底层通信模块传递消息
	COMMAND_START = 100
	COMMAND_CLOSE = 101
	COMMAND_WRITE = 102
	COMMAND_END = 199
	//1001-2000 msgID 定义

)

type InternalMsg struct {
	SysID      int32
	MsgID      uint32
	ConnID     uint32
	Content    []byte
	CustomData interface{}
}